[Cache] Reword "max lifetime" to "default lifetime" #17348
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The use of the word "maximum" here is not very clear; it's easy for somebody to mistakenly believe that this parameter limits the TTL of the higher caches to some maximum value. For example, if the second cache returns a hit with a TTL of 3600, then
$maxLifetime = 60
would mean the first cache should use a TTL of 60 since that's the "maximum lifetime". But looking at the code, that's not what happens - this parameter actually works as a default TTL for items without an expiry.I believe this possible confusion is why the variable was renamed in #26984 so let's update the documentation accordingly. Hopefully this will prevent others from making the same misunderstandings that I did :)